package com.test.sharding.utils;

import com.test.sharding.model.ValueDynamic;
import com.test.sharding.model.ValueOne;

import java.util.ArrayList;
import java.util.List;

public class ValueUtil {

    public static Boolean isDebugger = Boolean.FALSE;

    public static ValueOne getValueOne() {
        return new ValueOne(IdWrokerUtil.getNextId(), CharacterUtil.getString());
    }

    public static List<ValueOne> getValueOneList(int size) {
        List<ValueOne> valueOneList = new ArrayList<ValueOne>(size);

        for (int i = 0; i < size; i ++) {
            valueOneList.add(getValueOne());
        }

        return valueOneList;
    }

    public static ValueDynamic getValueDynamic() {
        return new ValueDynamic(IdWrokerUtil.getNextId(), CharacterUtil.getString());
    }

    public static List<ValueDynamic> getValueDynamicList(int size) {
        List<ValueDynamic> valueDynamicList = new ArrayList<ValueDynamic>(size);

        for (int i = 0; i < size; i ++) {
            valueDynamicList.add(getValueDynamic());
        }

        return valueDynamicList;
    }

}
